<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>title</title>
  <!--按顺序引入-->
  <script src="https://cdn.staticfile.org/react/16.8.4/umd/react.development.js"></script>
  <script src="https://cdn.staticfile.org/react-dom/16.8.4/umd/react-dom.development.js"></script><script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>
  <script src="../js/babel.min.js"></script>
  <style>
    body {
      background-color: #2b2b2b;
      color: wheat;
    }
  </style>
</head>
<body>
<div id="app"></div>

<script type="text/babel">
  // 类式组件
  class Demo extends React.Component {
    data = ['Angular', 'Vue', 'React']

    render() {
      return this.data.map((item, index) => {
        return <li key={index}>{item}</li>
      })
    }
  }

  // 渲染 都可以 但是推荐使用第二种,会被认为是组件
  ReactDOM.render(<Demo/>, document.getElementById(('app')))
</script>
</body>
</html>
